import { Directive, ElementRef } from '@angular/core';
import 'bootstrap-datepicker';
import 'bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js';


@Directive({
    selector: '[datePicker]'
})
export class DatePicker {

    constructor(private el: ElementRef) {
        jQuery(el.nativeElement).datepicker({
            format: 'yyyy-mm-dd',
            language: 'zh-CN',
            autoclose: true
        });
     }
}